package com.uplooking.pojo;

import java.sql.Timestamp;
import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

@Entity
@Table(name="tblorder")
public class OrderVO {

	@Id
	@Column(name="ono")
	private String ono;
	
	//顾客姓名
	@Column(name="custname")
	private String custname;
	
	//发件人信息
	@Column(name="senduser")
	private String senduser;
	@Column(name="sendphone")
	private String sendphone;

	//地址簿
	//收件地址 收件人信息
	@Column(name="receiveuser")
	private String receiveuser;
	@Column(name="receivephone")
	private String receivephone;
	@Column(name="receiveaddr")
	private String receiveaddr;
	
	//商品信息
	@Column(name="gno")
	private String gno;
	@Column(name="gname")
	private String gname;
	@Column(name="gtype")
	private String gtype;
	@Column(name="gdesc")
	private String gdesc;
	@Column(name="gsale")
	private Double gsale;
	@Column(name="gcount")
	private Integer gcount;
	
	//店铺信息
	@Column(name="user")
	private String user;
	@Column(name="stitle")
	private String stitle;
	@Column(name="svalue")
	private String svalue;
	@Column(name="sname")
	private String sname;
	@Column(name="sfax")
	private String sfax;
	@Column(name="saddr")
	private String saddr;
	
	@Column(name="omoney")
	private Double omoney;
	@JsonFormat(pattern="yyyy/MM/dd HH:mm:ss")
	@Column(name="otime")
	private Timestamp otime;
	@Column(name="ostatus")
	private Integer ostatus;
	@Column(name="odesc")
	private String odesc;
	public String getOno() {
		return ono;
	}
	public void setOno(String ono) {
		this.ono = ono;
	}
	public String getCustname() {
		return custname;
	}
	public void setCustname(String custname) {
		this.custname = custname;
	}
	public String getSenduser() {
		return senduser;
	}
	public void setSenduser(String senduser) {
		this.senduser = senduser;
	}
	public String getSendphone() {
		return sendphone;
	}
	public void setSendphone(String sendphone) {
		this.sendphone = sendphone;
	}
	public String getReceiveuser() {
		return receiveuser;
	}
	public void setReceiveuser(String receiveuser) {
		this.receiveuser = receiveuser;
	}
	public String getReceivephone() {
		return receivephone;
	}
	public void setReceivephone(String receivephone) {
		this.receivephone = receivephone;
	}
	public String getReceiveaddr() {
		return receiveaddr;
	}
	public void setReceiveaddr(String receiveaddr) {
		this.receiveaddr = receiveaddr;
	}
	public String getGno() {
		return gno;
	}
	public void setGno(String gno) {
		this.gno = gno;
	}
	public String getGname() {
		return gname;
	}
	public void setGname(String gname) {
		this.gname = gname;
	}
	public String getGtype() {
		return gtype;
	}
	public void setGtype(String gtype) {
		this.gtype = gtype;
	}
	public String getGdesc() {
		return gdesc;
	}
	public void setGdesc(String gdesc) {
		this.gdesc = gdesc;
	}
	public Double getGsale() {
		return gsale;
	}
	public void setGsale(Double gsale) {
		this.gsale = gsale;
	}
	public Integer getGcount() {
		return gcount;
	}
	public void setGcount(Integer gcount) {
		this.gcount = gcount;
	}
	public String getUser() {
		return user;
	}
	public void setUser(String user) {
		this.user = user;
	}
	public String getStitle() {
		return stitle;
	}
	public void setStitle(String stitle) {
		this.stitle = stitle;
	}
	public String getSvalue() {
		return svalue;
	}
	public void setSvalue(String svalue) {
		this.svalue = svalue;
	}
	public String getSname() {
		return sname;
	}
	public void setSname(String sname) {
		this.sname = sname;
	}
	public String getSfax() {
		return sfax;
	}
	public void setSfax(String sfax) {
		this.sfax = sfax;
	}
	public String getSaddr() {
		return saddr;
	}
	public void setSaddr(String saddr) {
		this.saddr = saddr;
	}
	
	public Double getOmoney() {
		return omoney;
	}
	public void setOmoney(Double omoney) {
		this.omoney = omoney;
	}
	public Timestamp getOtime() {
		return otime;
	}
	public void setOtime(Timestamp otime) {
		this.otime = otime;
	}
	public Integer getOstatus() {
		return ostatus;
	}
	public void setOstatus(Integer ostatus) {
		this.ostatus = ostatus;
	}
	public String getOdesc() {
		return odesc;
	}
	public void setOdesc(String odesc) {
		this.odesc = odesc;
	}
	public OrderVO() {
		super();
	}
	public OrderVO(String custname, String senduser, String sendphone, String receiveuser,
			String receivephone, String receiveaddr, String gno, String gname, String gtype, String gdesc, Double gsale,
			Integer gcount, String user, String stitle, String svalue, String sname, String sfax, String saddr,
			Timestamp otime, Integer ostatus, String odesc) {
		super();
		this.ono = UUID.randomUUID().toString();
		this.custname = custname;
		this.senduser = senduser;
		this.sendphone = sendphone;
		this.receiveuser = receiveuser;
		this.receivephone = receivephone;
		this.receiveaddr = receiveaddr;
		this.gno = gno;
		this.gname = gname;
		this.gtype = gtype;
		this.gdesc = gdesc;
		this.gsale = gsale;
		this.gcount = gcount;
		this.user = user;
		this.stitle = stitle;
		this.svalue = svalue;
		this.sname = sname;
		this.sfax = sfax;
		this.saddr = saddr;
		this.otime = otime;
		this.ostatus = ostatus;
		this.odesc = odesc;
	}
	@Override
	public String toString() {
		return "OrderVO [ono=" + ono + ", custname=" + custname + ", senduser=" + senduser + ", sendphone=" + sendphone
				+ ", receiveuser=" + receiveuser + ", receivephone=" + receivephone + ", receiveaddr=" + receiveaddr
				+ ", gno=" + gno + ", gname=" + gname + ", gtype=" + gtype + ", gdesc=" + gdesc + ", gsale=" + gsale
				+ ", gcount=" + gcount + ", user=" + user + ", stitle=" + stitle + ", svalue=" + svalue + ", sname="
				+ sname + ", sfax=" + sfax + ", saddr=" + saddr + ", otime=" + otime + ", ostatus=" + ostatus
				+ ", odesc=" + odesc + "]";
	}
	
}
